/* Copyright (c) 2015 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

//
//  GTLMirrorMenuItem.h
//

// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
//   Google Mirror API (mirror/v1)
// Description:
//   API for interacting with Glass users via the timeline.
// Documentation:
//   https://developers.google.com/glass
// Classes:
//   GTLMirrorMenuItem (0 custom class methods, 6 custom properties)

#if GTL_BUILT_AS_FRAMEWORK
  #import "GTL/GTLObject.h"
#else
  #import "GTLObject.h"
#endif

@class GTLMirrorMenuValue;

// ----------------------------------------------------------------------------
//
//   GTLMirrorMenuItem
//

// A custom menu item that can be presented to the user by a timeline item.

@interface GTLMirrorMenuItem : GTLObject

// Controls the behavior when the user picks the menu option. Allowed values
// are:
// - CUSTOM - Custom action set by the service. When the user selects this
// menuItem, the API triggers a notification to your callbackUrl with the
// userActions.type set to CUSTOM and the userActions.payload set to the ID of
// this menu item. This is the default value.
// - Built-in actions:
// - REPLY - Initiate a reply to the timeline item using the voice recording UI.
// The creator attribute must be set in the timeline item for this menu to be
// available.
// - REPLY_ALL - Same behavior as REPLY. The original timeline item's recipients
// will be added to the reply item.
// - DELETE - Delete the timeline item.
// - SHARE - Share the timeline item with the available contacts.
// - READ_ALOUD - Read the timeline item's speakableText aloud; if this field is
// not set, read the text field; if none of those fields are set, this menu item
// is ignored.
// - GET_MEDIA_INPUT - Allow users to provide media payloads to Glassware from a
// menu item (currently, only transcribed text from voice input is supported).
// Subscribe to notifications when users invoke this menu item to receive the
// timeline item ID. Retrieve the media from the timeline item in the payload
// property.
// - VOICE_CALL - Initiate a phone call using the timeline item's
// creator.phoneNumber attribute as recipient.
// - NAVIGATE - Navigate to the timeline item's location.
// - TOGGLE_PINNED - Toggle the isPinned state of the timeline item.
// - OPEN_URI - Open the payload of the menu item in the browser.
// - PLAY_VIDEO - Open the payload of the menu item in the Glass video player.
// - SEND_MESSAGE - Initiate sending a message to the timeline item's creator:
// - If the creator.phoneNumber is set and Glass is connected to an Android
// phone, the message is an SMS.
// - Otherwise, if the creator.email is set, the message is an email.
@property (nonatomic, copy) NSString *action;

// The ContextualMenus.Command associated with this MenuItem (e.g. READ_ALOUD).
// The voice label for this command will be displayed in the voice menu and the
// touch label will be displayed in the touch menu. Note that the default menu
// value's display name will be overriden if you specify this property. Values
// that do not correspond to a ContextualMenus.Command name will be ignored.
@property (nonatomic, copy) NSString *contextualCommand;

// The ID for this menu item. This is generated by the application and is
// treated as an opaque token.
// identifier property maps to 'id' in JSON (to avoid Objective C's 'id').
@property (nonatomic, copy) NSString *identifier;

// A generic payload whose meaning changes depending on this MenuItem's action.
// - When the action is OPEN_URI, the payload is the URL of the website to view.
// - When the action is PLAY_VIDEO, the payload is the streaming URL of the
// video
// - When the action is GET_MEDIA_INPUT, the payload is the text transcription
// of a user's speech input
@property (nonatomic, copy) NSString *payload;

// If set to true on a CUSTOM menu item, that item will be removed from the menu
// after it is selected.
@property (nonatomic, retain) NSNumber *removeWhenSelected;  // boolValue

// For CUSTOM items, a list of values controlling the appearance of the menu
// item in each of its states. A value for the DEFAULT state must be provided.
// If the PENDING or CONFIRMED states are missing, they will not be shown.
@property (nonatomic, retain) NSArray *values;  // of GTLMirrorMenuValue

@end
